/**
 * @param {number} num
 * @return {string}
 */
 var printBin = function(num) {
   let res = ''
  for(let i=0;i<30 && num!=0;i++){
    num = num*2
    if (num>=1) {
      res+='1'
      num-=1
    }else{
      res+='0'
    }
  }
  return '0.'+res
};
printBin(0.078125)
